[GLUTEN-8063][VL] Export cpuNanos metric for InputIteratorTransformer#11724
Open
n0r0shi wants to merge 1 commit intoapache:mainfrom
Open
[GLUTEN-8063][VL] Export cpuNanos metric for InputIteratorTransformer#11724n0r0shi wants to merge 1 commit intoapache:mainfrom
n0r0shi wants to merge 1 commit intoapache:mainfrom
Conversation
Export Velox's cpuWallTiming.cpuNanos through the full metrics pipeline (C++ -> JNI -> Java -> Scala) and display it as a new metric on InputIteratorTransformer. This addresses the confusing high wall time reported in apache#8063 and apache#10618 by providing a breakdown: wallNanos shows time including while waiting for upstream dat), while cpuNanos shows the exclusive CPU time (actual work done by the operator itself).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surfaces Velox's
cpuWallTiming.cpuNanosas a separate Spark SQL metric (cpu time) onInputIteratorTransformer. Currently onlywallNanosandcpuCountare exposed —cpuNanosis available from Velox but not propagated to Gluten. This change threads it through: C++ → JNI → Java → Scala SQLMetric. The metric automatically appears in Spark UI and event logs.Motivation
Related to #10618.
InputIteratorTransformersits at the boundary between Spark (shuffle/broadcast) and Velox. Its wall time includes I/O waits, not just CPU work. ExposingcpuNanosseparately lets users distinguish compute-bound vs I/O-bound bottlenecks. For most other operators,cpuNanos ≈ wallNanos— this boundary operator is where they diverge the most.Velox already tracks
cpuNanoson every operator — exposing it as-is is the simplest approach and better than not surfacing CPU time at all.Open questions
cpu time)?cpuNanos? (e.g., operators that spill to disk)Tests will be added once the approach is confirmed.
Related issue: #8063